#ifndef _MOVIEPLAYER_H 
#define _MOVIEPLAYER_H


//Video player
#include <TheoraPlayer.h>
#include <SFML/Graphics.hpp>

#include "OpenAL_AudioInterface.h"
#include "movie_clip.h"

#include <iostream>


class MoviePlayer 
{
public:
	MoviePlayer(void);
	~MoviePlayer(void);

	MovieClip* loadClip(const std::string& );
	void destroyClip(MovieClip *);

	//Play a fullscrened cutscene, 
	//A bool, to know if user can control the video,
	//and button to allow early exitu - use Escape by default
	bool playCutscene( sf::RenderWindow*, MovieClip*,  sf::Key::Code = sf::Key::Escape, bool= false );
	bool playCutscene( sf::RenderWindow*, const std::string&, sf::Key::Code = sf::Key::Escape, bool= false );

private:
//	TheoraVideoClip *clip;

	//sf::Image current_frame;
	TheoraVideoManager *mgr;
	OpenAL_AudioInterfaceFactory* iface_factory;

};


extern MoviePlayer movieManager;
#endif